/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
var dir = "12312312311111";
$(function()
{
    $("#delete").click(doDeleteCatcheFile);
}

);
function doDeleteCatcheFile() {
    
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {
        console.log("########" + fs.root);
        alert("########" + fs.root.fullPath);
        // fs.root.getFile("123.txt",{create:true},function(entry){alert( entry.toURL());entry.remove (function(){},function(){});},function(evt){});   
        fs.root.getFile("123.jpeg", {create: true}, function(entry) {
            var smallImage = document.getElementById("img1");
            
            smallImage.src = entry.nativeURL;
            alert(entry.nativeURL);
        }, function(evt) {
        });


        fs.root.getDirectory(dir, {create: true}, function(dirEntry) {
            // 删除此目录及其所有内容 

            /**	dirEntry.removeRecursively(function(evt){  
             
             console.log("删除缓存文件成功!");  
             }, function(evt){  
             myAlert("删除缓存文件失败!");
             console.log("删除缓存文件失败");  
             }); **/

        }, function(evt) {
            console.log("缓存文件不存在");

        });
    }, function(evt) {
        console.log("加载文件系统出现错误");
        alert("加载文件系统出现错误");
    });
}
